import Home from '@/auth/pages/Home'

export default {
  path: '/system',
  name: 'system',
  meta: {
    icon: 'ios-keypad',
    title: '系统管理'
  },
  component: Home,
  children: [
    {
      path: 'user-management',
      name: 'user-management',
      meta: {
        title: '用户管理'
      },
      component: () => import('@/views/system/UserManagement')
    },
    {
      path: 'user-management/:type/:id/:name',
      name: 'user-management-detail',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () =>
        import('@/views/system/UserManagement/UserManagementDetail.vue')
    },
    {
      path: 'job-management',
      name: 'job-management',
      meta: {
        title: '职务管理'
      },
      component: () => import('@/views/system/PositionManagement')
    },
    //职务管理新增
    {
      path: 'job-management/:type/:id/:name',
      name: 'job-management-add',
      meta: {
        title: route => `${route.params.name}`
      },
      props: true,
      component: () =>
        import('@/views/system/PositionManagement/PositionManagementAdd.vue')
    },
    //职务管理编辑
    {
      path: 'job-management/:type/:id/:name',
      name: 'job-management-edit',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () =>
        import('@/views/system/PositionManagement/PositionManagementEdit.vue')
    },
    //职务管理详情
    {
      path: 'job-management/:type/:id/:name',
      name: 'job-management-detail',
      meta: {
        title: route => `${route.params.name}`,
        notCache: true
      },
      component: () =>
        import('@/views/system/PositionManagement/PositionManagementDetail.vue')
    },
    {
      path: 'role-management',
      name: 'role-management',
      meta: {
        title: '角色管理'
      },
      component: () => import('@/views/system/RoleManagement.vue')
    },
    {
      path: 'role-management-add/:type/:id/:name',
      name: 'role-add',
      meta: {
        title: '角色新增',
        notCache: false
      },
      component: () => import('@/views/system/role/add.vue')
    },
    {
      path: 'role-management-edit/:type/:id/:name',
      name: 'role-edit',
      meta: {
        title: '角色编辑',
        notCache: false
      },
      component: () => import('@/views/system/role/edit.vue')
    },
    {
      path: 'role-management/:type/:id/:name',
      name: 'role-detail',
      meta: {
        title: '角色详情',
        notCache: false
      },
      component: () => import('@/views/system/role/detail.vue')
    },
    {
      path: 'dict-management',
      name: 'dict-management',
      meta: {
        title: '数据字典',
        notCache: false
      },
      component: () => import('@/views/system/DataDictionary')
    },
    /*{
      //数据字典----编辑/详情/新增
      path: 'dict-management/:type/:id/:name',
      name: 'add-editor-details',
      meta: {
        title: route => `${route.params.name}`,
        notAlive: true
      },
      component: () =>
        import('@/views/system/DataDictionary/AddEditorDetails.vue')
    },*/
    {
      //数据字典----新增
      path: 'dict-management-add/:type/:id/:name/:typeId',
      name: 'dict-management-add',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/system/DataDictionary/add.vue')
    },
    {
      //数据字典----编辑
      path: 'dict-management-edit/:type/:id/:name',
      name: 'dict-management-edit',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/system/DataDictionary/edit.vue')
    },
    {
      //数据字典----详情
      path: 'dict-management/:type/:id/:name',
      name: 'dict-management-detail',
      meta: {
        title: route => `${route.params.name}`,
        notCache: true
      },
      component: () => import('@/views/system/DataDictionary/detail.vue')
    },
    {
      path: 'menu-management',
      name: 'menu-management',
      meta: {
        title: '菜单管理',
        notCache: false
      },
      component: () =>
        import('@/views/system/MenuManagement/MenuManagement.vue')
    },
    /* {
      //菜单管理----编辑/详情
      path: 'menu-management/:type/:id/:name',
      name: 'editor-menu',
      meta: {
        title: route => `${route.params.name}`,
        notAlive: true
      },
      component: () => import('@/views/system/MenuManagement/EditorMenu.vue')
    },*/
    {
      //菜单管理----编辑
      path: 'menu-management-edit/:type/:id/:name',
      name: 'menu-edit',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/system/MenuManagement/edit.vue')
    },
    {
      //菜单管理----详情
      path: 'menu-management/:type/:id/:name',
      name: 'menu-detail',
      meta: {
        title: route => `${route.params.name}`,
        notCache: true
      },
      component: () => import('@/views/system/MenuManagement/detail.vue')
    },
    {
      path: 'operation-log',
      name: 'operation-log',
      meta: {
        title: '操作日志'
      },
      component: () => import('@/views/system/log/OperationLog.vue')
    },
    {
      path: 'dispatch-post',
      name: 'dispatch-post',
      meta: {
        title: '调度岗配置',
        notCache: true
      },
      component: () => import('@/views/system/dispatchPost')
    },
    {
      path: 'dispatch-post/:id',
      name: 'dispatch-post-add',
      meta: {
        title: '配置风险调度岗'
      },
      component: () => import('@/views/system/dispatchPost/dispatchPostAdd.vue')
    },
    {
      path: 'early-warning',
      name: 'early-warning',
      meta: {
        title: '预警配置'
      },
      component: () => import('@/views/system/earlyWarning')
    },
    {
      path: 'early-warning/:id',
      name: 'early-warning-edit',
      meta: {
        title: '预警编辑'
      },
      component: () =>
        import('@/views/system/earlyWarning/earlyWarningEdit.vue')
    }
  ]
}
